package com.gxm.练习.多线程.并发包.队列;

import java.util.concurrent.ConcurrentLinkedQueue;

/**
 * @创建人 郭训民
 * @创建时间 2019/11/16
 * @描述
 */
public class 无界Demo {
    public static void main(String[] args) {
        ConcurrentLinkedQueue concurrentLinkedQueue = new ConcurrentLinkedQueue();
        concurrentLinkedQueue.offer("张三");
        concurrentLinkedQueue.offer("李四");
        concurrentLinkedQueue.offer("王麻子");
        System.out.println(concurrentLinkedQueue.peek());
        System.out.println(concurrentLinkedQueue.size());
        System.out.println(concurrentLinkedQueue.poll());
        System.out.println(concurrentLinkedQueue.size());
    }
}
